import React from 'react'
import ListItem from '../components/listItem'



class MusicList extends React.Component{
    render(){
    let listEle = null ;

    listEle = this.props.musicList.map((item) =>{

        return (
                <ListItem
                 focus={item === this.props.currentMusicItem}
                key ={item.id}
                musicItem ={item}
                >
                {item.title}

                </ListItem>

        )
        })
    return(
        <ul>
            { listEle }

        </ul>


    )



}





}



export default MusicList;